package com.jh.user.business;

import java.util.List;
import java.util.Map;

import com.jh.user.pojo.User;
import com.jh.user.pojo.UserRealtion;

public interface UserRealtionBusiness {

	public void addRealtion() throws Exception;
	
	public void updateRealtion(User user) throws Exception;

	public List<UserRealtion> findByFirstUserId(Long userId);

	public void addOneUserRealtion(User user) throws Exception;

	public List<UserRealtion> findByPreUserId(long preUserId);

	public void deleteUserRealtions(List<UserRealtion> preUserRealtions);

	public List<UserRealtion> findByPreUserIdAndLevelInOrderByLevel(long userId, List<Integer> level);

	public void deleteAndRebuildUserRealtion(User oriUser, List<Long> sonUserIds) throws Exception;

	public UserRealtion findByFirstUserIdAndPreUserId(Long firstUserId, Long preUserId);

	public void updateUserToBrandUser(User user) throws Exception;

	public void updateUserToBrandUser2(User user);

	public UserRealtion save(UserRealtion userRealtion);
}
